package cn.chinaflame.pagodas.entity;
import javax.persistence.*;
import java.math.BigDecimal;

/**
 * Created by yw on 2018/1/25.
 */
@Entity
@Table(name = "vw_bless_invitation", schema = "pagoda", catalog = "pagoda")
public class VwBlessInvitation {
    private String nickName;
    private long personNumber;
    private long number;
    private String itemId;
    private String itemName;
    private String productId;
    private String productName;
    private BigDecimal money;
    private String endTime;
    private String sourceMemberId;
    private String invitationId;
    private String beWishedName;

    @Basic
    @Column(name = "nick_name")
    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    @Basic
    @Column(name = "source_member_id")
    public String getSourceMemberId() {
        return sourceMemberId;
    }

    public void setSourceMemberId(String sourceMemberId) {
        this.sourceMemberId = sourceMemberId;
    }

    @Basic
    @Column(name = "be_wished_name")
    public String getBeWishedName() {
        return beWishedName;
    }

    public void setBeWishedName(String beWishedName) {
        this.beWishedName = beWishedName;
    }

    @Id
    @Basic
    @Column(name = "invitation_id")
    public String getInvitationId() {
        return invitationId;
    }

    public void setInvitationId(String invitationId) {
        this.invitationId = invitationId;
    }

    @Basic
    @Column(name = "person_number")
    public long getPersonNumber() {
        return personNumber;
    }

    public void setPersonNumber(long personNumber) {
        this.personNumber = personNumber;
    }

    @Basic
    @Column(name = "number")
    public long getNumber() {
        return number;
    }

    public void setNumber(long number) {
        this.number = number;
    }

    @Basic
    @Column(name = "item_id")
    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    @Basic
    @Column(name = "item_name")
    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    @Basic
    @Column(name = "product_id")
    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    @Basic
    @Column(name = "product_name")
    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    @Basic
    @Column(name = "money")
    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    @Basic
    @Column(name = "end_time")
    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VwBlessInvitation that = (VwBlessInvitation) o;

        if (personNumber != that.personNumber) return false;
        if (number != that.number) return false;
        if (nickName != null ? !nickName.equals(that.nickName) : that.nickName != null) return false;
        if (itemId != null ? !itemId.equals(that.itemId) : that.itemId != null) return false;
        if (itemName != null ? !itemName.equals(that.itemName) : that.itemName != null) return false;
        if (productId != null ? !productId.equals(that.productId) : that.productId != null) return false;
        if (productName != null ? !productName.equals(that.productName) : that.productName != null) return false;
        if (money != null ? !money.equals(that.money) : that.money != null) return false;
        if (endTime != null ? !endTime.equals(that.endTime) : that.endTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = nickName != null ? nickName.hashCode() : 0;
        result = 31 * result + (int) (personNumber ^ (personNumber >>> 32));
        result = 31 * result + (int) (number ^ (number >>> 32));
        result = 31 * result + (itemId != null ? itemId.hashCode() : 0);
        result = 31 * result + (itemName != null ? itemName.hashCode() : 0);
        result = 31 * result + (productId != null ? productId.hashCode() : 0);
        result = 31 * result + (productName != null ? productName.hashCode() : 0);
        result = 31 * result + (money != null ? money.hashCode() : 0);
        result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
        return result;
    }
}
